import 'package:finance_app/generated/json/base/json_convert_content.dart';
import 'package:finance_app/generated/json/base/json_field.dart';
import 'package:finance_app/src/entities/account_entity.dart';
import 'package:finance_app/src/entities/ocr_attachment_entity.dart';
import 'package:finance_app/src/entities/related_payment_entity.dart';

class PaymentEntity with JsonConvert<PaymentEntity> {
  @JSONField(name: "data_type")
  String dataType;
  int id;
  @JSONField(name: "flow_type")
  String flowType;
  String type;
  @JSONField(name: "contact_id")
  int contactId;
  @JSONField(name: "account_id")
  int accountId;
  @JSONField(name: "payment_type_id")
  int paymentTypeId;
  @JSONField(name: "issued_at")
  String issuedAt;
  List<dynamic> numbers;
  @JSONField(name: "number_ids")
  List<dynamic> numberIds;
  @JSONField(name: "currency_code")
  String currencyCode;
  num total;
  @JSONField(name: "cheque_number")
  String chequeNumber;
  @JSONField(name: "created_at")
  String createdAt;
  @JSONField(name: "updated_at")
  String updatedAt;
  String name;

  AccountEntity account;

  @JSONField(name: "to_account")
  AccountEntity toAccount;

  @JSONField(name: "to_account_id")
  int toAccountId;
  @JSONField(name: "related_payment_id")
  int relatedPaymentId;
  @JSONField(name: "related_payment")
  RelatedPaymentEntity relatedPayment;
  List<OcrAttachmentEntity> attachments;
}
